/*
 * Author: nicolas.bredeche(@)lri.fr
 * Created on 20 janv. 2006
 * 
 */

package picoevo.gp.representation.genericoperators;

import java.util.ArrayList;

import picoevo.core.representation.Individual;
import picoevo.gp.representation.Element_Node_TreeGP_Terminal;
import picoevo.gp.representation.Individual_TreeGP;
import picoevo.gp.representation.MemoryModule_Individual_SingleRegister;

public class Element_Node_TreeGP_Variable extends Element_Node_TreeGP_Terminal {

	public Element_Node_TreeGP_Variable(Individual __individualOwner, ArrayList __elementLevelOperatorList) {
		super(__individualOwner, __elementLevelOperatorList);
		setArity(0);
		setDisplayValue("x");
	}

	@Override
	public double evaluateDouble() {
		return (((MemoryModule_Individual_SingleRegister) ((Individual_TreeGP) this.getOwner()).getMemoryModule()).getX());
	}

}
